<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue2 测试实例 </title>
<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
</head>
<body>
<div id="app">
  <h1>第一部分内容1</h1>
  {{ info }}
  <br/>
  <h1>第二部分内容</h1>
  {{ info1 }}
</div>
<script type = "text/javascript">
new Vue({
  el: '#app',
  data () {
    return {
      info: null,
      info1: null
    }
  },
  mounted () {
    axios
      .get('/eureka-consumer/hi?id=tom')
      .then(response => (this.info = response.data))
      .catch(function (error) { // 请求失败处理
        console.log(error);
      });
    axios
      .get('/eureka-provider/hi?id=jerry')
      .then(response => (this.info1 = response.data))
      .catch(error => {
        console.log(error);
      });
  }
})
</script>
</body>
</html>